package com.decade.sp09.feign;

import com.decade.sp01.pojo.Order;
import com.decade.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: decade
 * @Description: 订单远程调用接口
 * @Date: 2021/1/20 14:40
 **/
@FeignClient(name="order-service",fallback=OrderClientFB.class)
public interface OrderClient {

    @GetMapping("/{orderId}")
    JsonResult<Order> getOrder(@PathVariable String orderId);

    @GetMapping("/")
    JsonResult addOrder();
}
